package com.hx.entry;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.hx.validator.DictValue;
import com.hx.validator.StrContainValue;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class ExcelFieldData {
    @ExcelIgnore
    private Integer baseId;
    @ExcelIgnore
    private Integer rowNum;
    /*@ExcelIgnore//错误原因
    private String errorMsg;

    public void addErrorMsg(String msg) {
        if (this.errorMsg == null) {
            this.errorMsg = msg;
        } else {
            this.errorMsg = this.errorMsg + ";" + msg;
        }
    }*/
    //----base_areas----start------
    @ExcelProperty(index = 17)
    private BigDecimal frontWidth;
    @ExcelProperty(index = 18)
    private BigDecimal depth;
    @ExcelProperty(index = 19)
    private BigDecimal landTotal;
    @ExcelProperty(index = 20)
    private BigDecimal landMilitary;
    @ExcelProperty(index = 21)
    private BigDecimal landNonMilitary;
    @ExcelProperty(index = 22)
    private BigDecimal waterArea;
    //-----base_areas----end------

    //----base_contacts----start------
    @ExcelProperty(index = 27)
    private String contactPerson;
    @ExcelProperty(index = 28)
    private String contactPhone;
    @ExcelProperty(index = 29)
    private String dutyPhone;
    //----base_contacts----end------

    //----base_locations----start------
    @ExcelProperty(index = 5)
    private String province;
    @ExcelProperty(index = 6)
    private String city;
    @ExcelProperty(index = 7)
    private String district;
    @ExcelProperty(index = 8)
    private String address;
    @ExcelProperty(index = 9)
    private BigDecimal longitude;
    @ExcelProperty(index = 10)
    private BigDecimal latitude;
    @ExcelProperty(index = 11)
    private BigDecimal altitude;
    @ExcelProperty(index = 12)
    @StrContainValue(key = "terrain_feature", matchType = StrContainValue.MatchType.NAME, message = "地形特征")
    //@Pattern(regexp = "^(平原|丘陵|山地|高原|戈壁荒漠|濒海|海岛滩涂)(，(平原|丘陵|山地|高原|戈壁荒漠|濒海|海岛滩涂))*[，]?$", message = "[地形特征](平原/丘陵/山地/高原/戈壁荒漠/濒海/海岛滩涂中的一种或多个(用，号相隔))")
    private String terrainFeature;
    @ExcelProperty(index = 13)
    @DictValue(key = "theater", matchType = DictValue.MatchType.NAME, message = "战区方向")
    //@ListValue(vals = {"东部战区", "西部战区", "南部战区", "北部战区", "中部战区"}, message = "[战区方向](东部/西部/南部/北部/中部战区)")
    private String theaterDirection;
    //----base_locations----end------

    //----infrastructure----start------
    @DictValue(key = "facility_ab", matchType = DictValue.MatchType.NAME, message = "训练场地设施")
    //@ListValue(vals = {"类型A", "类型B"}, message = "[训练场地设施](类型A/类型B)")
    @ExcelProperty(index = 60)
    private String facilityTypeIdAb;
    @ExcelProperty(index = 61)
    private Integer quantityAb;
    @ExcelProperty(index = 62)
    private String capabilityReqAb;
    @ExcelProperty(index = 63)
    private String capabilityCurAb;
    @ExcelProperty(index = 56)
    @DictValue(key = "facility_12", matchType = DictValue.MatchType.NAME, message = "训练场地设施")
    //@ListValue(vals = {"类型1", "类型2"}, message = "[训练场地设施](类型1/类型2)")
    private String facilityTypeId12;
    @ExcelProperty(index = 57)
    private Integer quantity12;
    @ExcelProperty(index = 58)
    private String capabilityReq12;
    @ExcelProperty(index = 59)
    private String capabilityCur12;
    //----infrastructure----end------

    //----joint_systems----start------
    @ExcelProperty(index = 36)
    private String deviceType1;
    @ExcelProperty(index = 37)
    private Integer quantity1;
    @ExcelProperty(index = 38)
    private String capabilityReq1;
    @ExcelProperty(index = 39)
    private String capabilityCur1;
    @ExcelProperty(index = 40)
    private String deviceType2;
    @ExcelProperty(index = 41)
    private Integer quantity2;
    @ExcelProperty(index = 42)
    private String capabilityReq2;
    @ExcelProperty(index = 43)
    private String capabilityCur2;
    @ExcelProperty(index = 44)
    private String deviceType3;
    @ExcelProperty(index = 45)
    private Integer quantity3;
    @ExcelProperty(index = 46)
    private String capabilityReq3;
    @ExcelProperty(index = 47)
    private String capabilityCur3;
    @ExcelProperty(index = 48)
    private String deviceType4;
    @ExcelProperty(index = 49)
    private Integer quantity4;
    @ExcelProperty(index = 50)
    private String capabilityReq4;
    @ExcelProperty(index = 51)
    private String capabilityCur4;
    @ExcelProperty(index = 52)
    private String deviceType5;
    @ExcelProperty(index = 53)
    private Integer quantity5;
    @ExcelProperty(index = 54)
    private String capabilityReq5;
    @ExcelProperty(index = 55)
    private String capabilityCur5;
    //----joint_systems----end------

    //----training_bases----start------
    @ExcelProperty(index = 0)
    private String serialNumber;
    @ExcelProperty(index = 1)
    @DictValue(key = "base", matchType = DictValue.MatchType.NAME, message = "类型1")
    private String baseType1;
    @ExcelProperty(index = 2)
    @DictValue(key = "training", matchType = DictValue.MatchType.NAME, message = "类型2")
    private String baseType2;
    @ExcelProperty(index = 3)
    private String baseName;
    @ExcelProperty(index = 4)
    private String baseCode;
    @ExcelProperty(index = 14)
    private String parentUnit;
    @ExcelProperty(index = 15)
    private String managementUnit;
    @ExcelProperty(index = 16)
    @DictValue(key = "org_level", matchType = DictValue.MatchType.NAME, message = "编制级别")
    //@ListValue(vals = {"正军级", "副军级", "正师级", "副师级", "正团级", "副团级", "正营级", "副营级"}, message = "[编制级别](正军/副军/正师/副师/正团/副团/正营级/副营级)")
    private String organizationLevel;
    @ExcelProperty(index = 25)
    private BigDecimal maxElevation;
    @ExcelProperty(index = 26)
    private BigDecimal minElevation;
    @ExcelProperty(index = 30)
    private String trainingEnvironment;
    @ExcelProperty(index = 31)
    private String exerciseFunction;
    @ExcelProperty(index = 32)
    private String trainingScale;
    @ExcelProperty(index = 33)
    private String informationizedTrainingConditions;
    @ExcelProperty(index = 34)
    private Integer maxCapacity;
    @ExcelProperty(index = 35)
    @DictValue(key = "share_property", matchType = DictValue.MatchType.NAME, message = "共享属性")
    //@ListValue(vals = {"可共享共用", "不可共享共用"}, message = "[共享属性](可共享共用/不可共享共用)")
    private String shareProperties;
    @ExcelProperty(index = 64)
    @DictValue(key = "in14thPlan", matchType = DictValue.MatchType.NAME, message = "是否纳入十四五规划")
    //@ListValue(vals = {"是", "否"}, message = "[是否纳入十四五规划](是/否)")
    private String in14thPlan;
    @ExcelProperty(index = 65)
    private String projectNumber;
    @ExcelProperty(index = 66)
    private String construction2025;
    @ExcelProperty(index = 67)
    private String construction2027;
    @ExcelProperty(index = 68)
    private String remark;
    //----training_bases----end------

    //----training_capabilities----start------
    @ExcelProperty(index = 23)
    private String tacticalCore;
    @ExcelProperty(index = 24)
    private String tacticalFeature;
    //----training_capabilities----end------
}